<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <title>重复的线性渐变</title>
    <style>
        /* 重复的线性渐变 */
        /* repeating-linear-gradient() 函数用于重复线性渐变： */

        #grad1 {
            height: 200px;
            /* 浏览器不支持的时候显示 */
            background-color: red;
            background-image: repeating-linear-gradient(red, yellow 10%, green 20%);
        }

        #grad2 {
            height: 200px;
            /* 浏览器不支持的时候显示 */
            background-color: red;
            background-image: repeating-linear-gradient(45deg, red, yellow 7%, green 10%);
        }

        #grad3 {
            height: 200px;
            /* 浏览器不支持的时候显示 */
            background-color: red;
            background-image: repeating-linear-gradient(190deg, red, yellow 7%, green 10%);
        }

        #grad4 {
            height: 200px;
            /* 浏览器不支持的时候显示 */
            background-color: red;
            background-image: repeating-linear-gradient(90deg, red, yellow 7%, green 10%);
        }
    </style>
</head>

<body>

    <h1>重复的线性渐变</h1>

    <div id="grad1"></div>

    <p>45deg:</p>
    <div id="grad2"></div>

    <p>190deg:</p>
    <div id="grad3"></div>

    <p>90deg:</p>
    <div id="grad4"></div>

    <p><strong>注意:</strong> Internet Explorer 9 及更早版本的 IE 浏览器不支持线性渐变。</p>

</body>

</html>